/*租户*/

import React from 'react';
import {useState} from 'react';
import { Card, Col, Row, Input, Button, Table, type TableProps, Tag, Space } from 'antd';
import { type DataType } from './interface';

const Users = () => {
    const [dataList,setDataList] = useState<DataType[]>([])

    
    const columns: TableProps<DataType>['columns'] = [
        {
            title: '客户名称',
            dataIndex: 'name',
            key: 'name',
            render: (text) => <a>{text}</a>,
        },
        {
            title: '经营状态',
            dataIndex: 'status',
            key: 'status',
        },
        {
            title: '联系电话',
            dataIndex: 'tel',
            key: 'tel',
        },
        {
            title: '所属行业',
            key: 'business',
            dataIndex: 'business',
        },{
            title:"邮箱",
            dataIndex: 'email',
            key: 'email',
        },{
            title:"统一信用代码",
            dataIndex: 'creditCode',
            key: 'creditCode',
        },{
            title:"工商注册号",
            dataIndex: 'integratedCode',
            key: 'integratedCode',
        },{
            title:"组织机构代码",
            dataIndex: 'organizationCode',
            key: 'organizationCode',
        },{
            title:"法人名称",
            dataIndex: 'legalPersonName',
            key: 'legalPersonName',
        },{
            title:"操作",
            dataIndex: 'action',
            key: 'action',
            render: (_, record) => (
                <Space size="middle">
                    <a>Invite {record.name}</a>
                    <a>Delete</a>
                </Space>
            ),
        },
        
    ];



    return (
        <div className='users'>
            <Card>
                <Row gutter={16} className='search'>
                    <Col span={7}>
                        <p>企业名称:</p><Input placeholder="企业名称" />
                    </Col>
                    <Col span={7}>
                        <p>联系人:</p><Input placeholder="联系人" />
                    </Col>
                    <Col span={7}>
                        <p>联系电话:</p><Input placeholder="手机号" />
                    </Col>
                    <Col span={3}>
                        <Button type='primary' className='mr-3'>查询</Button>
                        <Button >重置</Button>
                    </Col>
                </Row>
            </Card>
            <Card className='text-right'>
                <Button type='primary' className='mr-3'>新增企业</Button>
                <Button type='primary' danger>批量删除</Button>
            </Card>
            <Card>
                <Table<DataType> columns={columns} dataSource={dataList} />

            </Card>
        </div>
    )
}

export default Users;